/*
 * @Author: wangwang 2723008256@qq.com
 * @Date: 2022-05-12 08:35:11
 * @LastEditors: 番茄炒蛋蛋 wzh15802755802@163.com
 * @LastEditTime: 2024-12-18 11:30:19
 * @FilePath: \jzjypc4.0\vue.config.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
// 要修改链接页  request vue.config   myCollect
var webpack = require('webpack')
// console.log(this.$globalUrl)
// const hostUrl = this.$globalUrl;
// const hostUrl = 'https://jyptwebtest.idianjiao.com' //新测试
// const hostUrl = 'https://jypt.webtest.ibei360.cn' //测试
const hostUrl = 'https://jypt.idianjiao.com' // 正式
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
    publicPath:'/pc/',
    lintOnSave: false,
    devServer: {
        proxy:{
            '/api': {
                target:hostUrl,
                changeOrigin: true,
                ws: true,
                pathRewrite: {
                    '^/api': ''
                }
            }
        }
    },
    configureWebpack: {
        plugins: [
            new webpack.ProvidePlugin({ 
                $: "jquery",
                jQuery: "jquery",
                "windows.jQuery": "jquery"
            }),
        new CopyWebpackPlugin([
            { from: 'node_modules/@liveqing/liveplayer/dist/component/crossdomain.xml'},
            { from: 'node_modules/@liveqing/liveplayer/dist/component/liveplayer-lib.min.js', to: 'js/'},
            { from: 'node_modules/@liveqing/liveplayer/dist/component/liveplayer.swf'}
        ])
      ]
    },
   
}
 
